
const QuestionAnswer = {
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "eq_id": {
                "type": "string",
                "description": "考题编号"
            },
            "answer_body": {
                "oneOf": [
                    {
                        "type": "array",
                        "items": {
                            "type": "integer",
                            "description": "答案项"
                        },
                        "description": "答案数组"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "description": "填空题答案选项"
                        },
                        "description": "填空题答案数组"
                    },
                    {
                        "type": "boolean",
                        "description": "判断题答案"
                    },
                    {
                        "type": "string",
                        "description": "简答题答案"
                    }
                ],
                "description": "答案主体"
            }
        },
        "required": [
            "eq_id",
            "answer_body"
        ]
    },
    "description": "答题数组"
}


const choiceQuestionAnswer = {
    "type": "array",
    "items": {
        "type": "integer",
        "description": "答案项"
    },
    "description": "答案数组"
}
const blankQuestionAnswer = {
    "type": "array",
    "items": {
        "type": "string",
        "description": "填空题答案选项"
    },
    "description": "填空题答案数组"
}
const judgingQuestionAnswer = {
    "type": "boolean",
    "description": "判断题答案"
}
const shortAnswerQuestionAnswer = {
    "type": "string",
    "description": "简答题答案"
}


module.exports = {
    choiceQuestionAnswer,
    blankQuestionAnswer,
    judgingQuestionAnswer,
    shortAnswerQuestionAnswer,
    QuestionAnswer
}